home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Events
/
ScreenPart.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
681b
|
37 lines
// ScreenPart.cp
#ifndef ScreenPart_h
#include "ScreenPart.h"
#endif
#ifndef WindowObject_h
#include "WindowObject.h"
#endif
ScreenPart::ScreenPart( PointObject where )
{
WindowPtr windowPtr;
part = static_cast<PartCode>( FindWindow( where, &windowPtr ) );
window = reinterpret_cast<WindowObject *>( windowPtr );
if ( part == desktop || part == menuBar )
window = 0;
else
{
Assert( window != 0 );
switch ( part )
{
case windowGrowBox:
Assert( window->IsFrontmost() );
break;
case windowCloseBox:
case windowZoomInBox:
case windowZoomOutBox:
if ( !window->IsFrontmost() )
part = windowDragRegion;
break;
}
}
}